package com.huawei.rbac.design.strategy;

public class StrategyTest {

    public static void main(String[] args) {

        String exp = "2+8";
        ICalculator cal = new Plus();
        int result = cal.calculate(exp);

        String exp2 = "10-8";
        ICalculator minus = new Minus();
        int result2 = minus.calculate(exp2);

        String exp3 = "10*8";
        ICalculator multiply = new Multiply();
        int result3 = multiply.calculate(exp3);


        System.out.println("Plus:" + result);
        System.out.println("Minus:" + result2);
        System.out.println("Multiply:" + result3);
    }
}  